1. Technical Field
The present invention relates to a smooth text display system for effecting flicker-free text updates.
2. Description of the Related Art
Most word processing application programs which are run in a windowed environment, such as IBM Operating System/2, utilize the functions indigenous to that operating system to reflect various edit operations, such as block cut and paste or move, effected on a document. "IBM" and "Operating System/2" are trademarks of International Business Machines Corporation.
In conventional word processing systems when currently displayed text is updated, the old text must be removed from the display prior to the updated text being displayed. The replacement of the text can be effected in a number of ways. Firstly, if the text is tied to a regular rectangular grid, an update would be effected by merely replacing the original characters with the updated characters. However, if the text is more free-form or proportionally spaced, such as that employed by IBM's Operating System/2 Presentation Manager, erasing the old text is more problematic. "Presentation Manager" is a trademark of International Business Machines Corporation. Individual character spacing and positioning information is required when a character string is written to the screen. In order to delete a text often a blank rectangle overwriting the old text to be updated is drawn followed by writing the updated text. However, this can cause an appreciable amount of undesirable flicker or a flash when a significant number of characters are updated due to the efficacy with which a display system can effect such an update.
IBM Technical Disclosure Bulletin, Vol. 31, No. 10, March 1989, Clegg et al. discloses a method of eliminating alphanumeric flicker on display screens which does not provide direct access to the bit planes of the display. The method assigns to each character representation to be displayed an additional attribute, referred to as the clean bit. The clean bit allows the hardware to make decisions regarding the character being written based upon the status of the character's clean bit. If the clean bit is "on" the hardware leaves the current character position on the screen unchanged, and proceeds to the next character position within the buffer. If the clean bit is "off" the hardware places the character into the bit planes in the conventional manner, turns the clean bit, for that character, "on" and progresses to the next character in the buffer. The software which places new characters in the buffer implements the following algorithm:
(a) compare the character in the buffer with the new character; PA0 (b) if the characters are the same in all respects (excluding the clean bit), leave the position unchanged; or PA0 (c) if the characters are not the same in all respects (excluding the clean bit), then update the position with the new character and turn the clean bit "off". PA0 means for determining the width of each character used within the system when displaying the characters; PA0 means for associating each character of the updated and original texts with a corresponding character width according to the character width determination; PA0 means for sequentially accessing each character and associated character width of the original and updated texts respectively; PA0 means for calculating a cumulative character width for each character of both the original and updated texts and comparing the cumulative character widths to identify the lesser; PA0 means for interleaving the characters of the original and updated texts and associated cumulative character widths by sequentially storing each said lesser cumulative character width and each associated character in a first and second buffer respectively thereby establishing the order of display of the interleaved characters according to each original and updated cumulative character width; PA0 means for calculating the difference between contiguous interleaved cumulative character widths thereby determining a display position for each interleaved character; and PA0 means for sequentially displaying the interleaved characters according to the order at the display positions thereby incrementally displaying and deleting characters of the updated and original texts respectively such that an original character is deleted and replaced by an appropriate number of updated text characters resulting in a smooth text update. PA0 determining the width of each character when displaying the characters; PA0 associating each character of the updated and original texts with a corresponding character width according to the character width determination; PA0 sequentially accessing each character and associated character width of the original and updated texts respectively; PA0 calculating a cumulative character width for each character of both the original and updated texts and comparing the cumulative character widths to identify the lesser; PA0 interleaving the characters of the original and updated texts and associated cumulative character widths by sequentially storing each lesser cumulative character width and each associated character in a first and second buffer respectively thereby establishing the order of display of said interleaved characters according to each original and updated cumulative character width; PA0 calculating the difference between contiguous interleaved cumulative character widths thereby determining a display position for each interleaved character; and PA0 sequentially displaying the interleaved characters according to the order at the display positions thereby incrementally displaying and deleting characters of the updated and original texts respectively such that an original character is deleted and replaced by an appropriate number of updated text characters resulting in a smooth text update. PA0 means for determining the width of each character used within the system when displaying the characters; PA0 means for calculating and associating with each character of the updated and original texts a corresponding character end position according to the character width determination; PA0 means for associating a flag indicating a character type with each character of the original and updated texts; PA0 means for copying all associated character end positions and flags to a common buffer; PA0 means for arranging the character end positions and flags within the common buffer according to the character end positions; PA0 means for calculating the difference between contiguous arranged character end positions and storing the differences back in the common buffer; PA0 means for identifying the minima of the differences thereby determining where the original and updated texts have the closest match in terms of character end positions; PA0 means responsive to the minima and the character end positions for displaying all updated characters followed by all original characters between consecutive minima thereby incrementally displaying and deleting characters of the updated and original texts respectively such that an original character is deleted only upon prior replacement by an appropriate number of updated text characters resulting in a smooth text update. PA0 determining the width of each character when displaying the characters; PA0 calculating and associating with each character of the updated and original texts a corresponding character end position according to the character width determination; PA0 associating a flag indicating a character type with each character of the original and updated texts; PA0 copying all associated character end positions and flags to a common buffer; PA0 arranging the character end positions and flags within the common buffer according to the character end positions; PA0 calculating the difference between contiguous arranged character end positions and storing said differences back in the common buffer; PA0 identifying the minima of said differences thereby determining where the original and updated texts have the closest match in terms of character end positions; PA0 displaying all updated characters followed by all original characters between consecutive minima thereby incrementally displaying and deleting characters of the updated and original texts respectively such that an original character is deleted only upon prior replacement by an appropriate number of updated text characters resulting in a smooth text update.
This combination of algorithms causes the bit planes to be updated only when the character on the display will be changed in some respect. However, it is noted that the method disclosed by Clegg et al. would only be suitable for use within a system employing text which is tied to a rectangular grid and would be ineffective within a system utilizing proportional spacing. Within a system using a tied grid the bit pattern representing an updating character completely overwrites the bit pattern representing an original character within a predefined region thereby avoiding the problems associated with proportionally spaced systems.